<template>
	<view v-if="params.url">
		<web-view :src="`${params.url}`"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				params: {},
			}
		},
		props: {
			src: {
				type: [String],
				default: null
			}
		},
		onLoad({ url, title }) {
			this.params.url = decodeURIComponent(url)
			if (title) {
				uni.setNavigationBarTitle({
					title: title
				})
			}
		}
	}
</script>